package com.mathdroid.gui.componentlist;

import javax.swing.JPanel;

/**
 * This is basically a JPanel. Extend this to create your own custom cell
 * with heavy weight JComponents. A cell is a view of the corresponding model
 * element.
 */
public abstract class Cell extends JPanel {

	/**
	 * Default UID.
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * The model element of this cell.
	 */
	private AComponentListElement element = null;

	/**
	 * Set the model element of this cell.
	 * @param e Model element.
	 */
	public final void setElement(final AComponentListElement e) {
		this.element = e;
	}
	
	/**
	 * Get the model element for this cell.
	 * @return Model element.
	 */
	public final AComponentListElement getElement() {
		return this.element;
	}
}
